export default {
  updateUrl: "http://127.0.0.1:8090",
  user: {},
  roles: [],
  modules: [],
  setUser(user = {}) {
    this.user = user;
  },
  setRoles(roles = []) {
    this.roles = !roles ? [] : roles;
  },
  setModules(modules = []) {
    this.modules = !modules ? [] : modules;
  },
  setUserInfo({ loginId, name, role, roles, urls }) {
    this.user = { loginId, name, role, roles, urls };
    this.roles = !roles ? [] : roles;
    this.modules = !urls ? [] : urls;
  }
};
